Optimal. Leaf size=106 \[ \frac {i (e+f x)^3}{3 a f}-\frac {2 i (e+f x)^2 \log \left (1+i e^{c+d x}\right )}{a d}-\frac {4 i f (e+f x) \text {PolyLog}\left (2,-i e^{c+d x}\right )}{a d^2}+\frac {4 i f^2 \text {PolyLog}\left (3,-i e^{c+d x}\right )}{a d^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 106, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {5678, 2221,
2611, 2320, 6724} \begin {gather*} \frac {4 i f^2 \text {Li}_3\left (-i e^{c+d x}\right )}{a d^3}-\frac {4 i f (e+f x) \text {Li}_2\left (-i e^{c+d x}\right )}{a d^2}-\frac {2 i (e+f x)^2 \log \left (1+i e^{c+d x}\right )}{a d}+\frac {i (e+f x)^3}{3 a f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2221
Rule 2320
Rule 2611
Rule 5678
Rule 6724
Rubi steps
\begin {align*} \int \frac {(e+f x)^2 \cosh (c+d x)}{a+i a \sinh (c+d x)} \, dx &=\frac {i (e+f x)^3}{3 a f}+2 \int \frac {e^{c+d x} (e+f x)^2}{a+i a e^{c+d x}} \, dx\\ &=\frac {i (e+f x)^3}{3 a f}-\frac {2 i (e+f x)^2 \log \left (1+i e^{c+d x}\right )}{a d}+\frac {(4 i f) \int (e+f x) \log \left (1+i e^{c+d x}\right ) \, dx}{a d}\\ &=\frac {i (e+f x)^3}{3 a f}-\frac {2 i (e+f x)^2 \log \left (1+i e^{c+d x}\right )}{a d}-\frac {4 i f (e+f x) \text {Li}_2\left (-i e^{c+d x}\right )}{a d^2}+\frac {\left (4 i f^2\right ) \int \text {Li}_2\left (-i e^{c+d x}\right ) \, dx}{a d^2}\\ &=\frac {i (e+f x)^3}{3 a f}-\frac {2 i (e+f x)^2 \log \left (1+i e^{c+d x}\right )}{a d}-\frac {4 i f (e+f x) \text {Li}_2\left (-i e^{c+d x}\right )}{a d^2}+\frac {\left (4 i f^2\right ) \text {Subst}\left (\int \frac {\text {Li}_2(-i x)}{x} \, dx,x,e^{c+d x}\right )}{a d^3}\\ &=\frac {i (e+f x)^3}{3 a f}-\frac {2 i (e+f x)^2 \log \left (1+i e^{c+d x}\right )}{a d}-\frac {4 i f (e+f x) \text {Li}_2\left (-i e^{c+d x}\right )}{a d^2}+\frac {4 i f^2 \text {Li}_3\left (-i e^{c+d x}\right )}{a d^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 94, normalized size = 0.89 \begin {gather*} \frac {i \left (d^2 (e+f x)^2 \left (d (e+f x)-6 f \log \left (1+i e^{c+d x}\right )\right )-12 d f^2 (e+f x) \text {PolyLog}\left (2,-i e^{c+d x}\right )+12 f^3 \text {PolyLog}\left (3,-i e^{c+d x}\right )\right )}{3 a d^3 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 404 vs. \(2 (94 ) = 188\).
time = 1.56, size = 405, normalized size = 3.82
method | result | size |
risch | \(\frac {i f e \,x^{2}}{a}-\frac {4 i f c e \ln \left ({\mathrm e}^{d x +c}\right )}{d^{2} a}-\frac {2 i f^{2} c^{2} x}{d^{2} a}-\frac {2 i f^{2} \ln \left (1+i {\mathrm e}^{d x +c}\right ) x^{2}}{d a}-\frac {4 i f e \ln \left (1+i {\mathrm e}^{d x +c}\right ) x}{d a}+\frac {i f^{2} x^{3}}{3 a}-\frac {2 i \ln \left ({\mathrm e}^{d x +c}-i\right ) e^{2}}{d a}-\frac {i e^{3}}{3 a f}+\frac {2 i \ln \left ({\mathrm e}^{d x +c}\right ) e^{2}}{d a}-\frac {i e^{2} x}{a}-\frac {2 i f^{2} c^{2} \ln \left ({\mathrm e}^{d x +c}-i\right )}{d^{3} a}+\frac {4 i f^{2} \polylog \left (3, -i {\mathrm e}^{d x +c}\right )}{a \,d^{3}}+\frac {2 i f^{2} c^{2} \ln \left ({\mathrm e}^{d x +c}\right )}{d^{3} a}+\frac {4 i f e c x}{d a}-\frac {4 i f^{2} \polylog \left (2, -i {\mathrm e}^{d x +c}\right ) x}{d^{2} a}+\frac {2 i f^{2} \ln \left (1+i {\mathrm e}^{d x +c}\right ) c^{2}}{d^{3} a}-\frac {4 i f^{2} c^{3}}{3 d^{3} a}+\frac {4 i f c e \ln \left ({\mathrm e}^{d x +c}-i\right )}{d^{2} a}+\frac {2 i f e \,c^{2}}{d^{2} a}-\frac {4 i f e \polylog \left (2, -i {\mathrm e}^{d x +c}\right )}{d^{2} a}-\frac {4 i f e \ln \left (1+i {\mathrm e}^{d x +c}\right ) c}{d^{2} a}\) | \(405\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.33, size = 166, normalized size = 1.57 \begin {gather*} -\frac {i \, f^{2} x^{3} + 3 i \, f x^{2} e}{3 \, a} - \frac {4 i \, {\left (d x \log \left (i \, e^{\left (d x + c\right )} + 1\right ) + {\rm Li}_2\left (-i \, e^{\left (d x + c\right )}\right )\right )} f e}{a d^{2}} - \frac {i \, e^{2} \log \left (i \, a \sinh \left (d x + c\right ) + a\right )}{a d} - \frac {2 i \, {\left (d^{2} x^{2} \log \left (i \, e^{\left (d x + c\right )} + 1\right ) + 2 \, d x {\rm Li}_2\left (-i \, e^{\left (d x + c\right )}\right ) - 2 \, {\rm Li}_{3}(-i \, e^{\left (d x + c\right )})\right )} f^{2}}{a d^{3}} - \frac {2 \, {\left (-i \, d^{3} f^{2} x^{3} - 3 i \, d^{3} f x^{2} e\right )}}{3 \, a d^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 190 vs. \(2 (89) = 178\).
time = 0.35, size = 190, normalized size = 1.79 \begin {gather*} \frac {i \, d^{3} f^{2} x^{3} + 2 i \, c^{3} f^{2} + 12 i \, f^{2} {\rm polylog}\left (3, -i \, e^{\left (d x + c\right )}\right ) - 12 \, {\left (i \, d f^{2} x + i \, d f e\right )} {\rm Li}_2\left (-i \, e^{\left (d x + c\right )}\right ) - 3 \, {\left (-i \, d^{3} x - 2 i \, c d^{2}\right )} e^{2} - 3 \, {\left (-i \, d^{3} f x^{2} + 2 i \, c^{2} d f\right )} e - 6 \, {\left (i \, c^{2} f^{2} - 2 i \, c d f e + i \, d^{2} e^{2}\right )} \log \left (e^{\left (d x + c\right )} - i\right ) - 6 \, {\left (i \, d^{2} f^{2} x^{2} - i \, c^{2} f^{2} + 2 \, {\left (i \, d^{2} f x + i \, c d f\right )} e\right )} \log \left (i \, e^{\left (d x + c\right )} + 1\right )}{3 \, a d^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {i \left (\int \frac {e^{2} \cosh {\left (c + d x \right )}}{\sinh {\left (c + d x \right )} - i}\, dx + \int \frac {f^{2} x^{2} \cosh {\left (c + d x \right )}}{\sinh {\left (c + d x \right )} - i}\, dx + \int \frac {2 e f x \cosh {\left (c + d x \right )}}{\sinh {\left (c + d x \right )} - i}\, dx\right )}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\mathrm {cosh}\left (c+d\,x\right )\,{\left (e+f\,x\right )}^2}{a+a\,\mathrm {sinh}\left (c+d\,x\right )\,1{}\mathrm {i}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________